---
title: Native Query Planner
subtitle: Run the Rust-native query planner in GraphOS Router
minVersion: Router v1.49.0
redirectFrom:
  - /router/configuration/experimental_query_planner_mode
  - /router/executing-operations/native-query-planner
---

Learn about the Rust-native query planner in GraphOS Router v2.x

## Background about query planner implementations

In v1.49.0, the router introduced a query planner implemented natively in Rust. This native query planner improves the overall performance and resource utilization of query planning. It existed alongside the legacy JavaScript implementation that uses the V8 JavaScript engine.

As of v1.59.0, the native query planner is the default planner in the router. As a result, the legacy query planner, which was built using Deno and relied on the v8 engine, has been deprecated.

As of v2.x, the legacy query planner has been removed.

## Improved performance of native query planner

The native query planner achieves better performance for a variety of graphs. In our tests, we observe:

- 10x median improvement in query planning time (observed via the `apollo.router.query_planning.plan.duration` metric)
- 2.9x improvement in router’s CPU utilization
- 2.2x improvement in router’s memory usage

You can expect generated plans and subgraph operations in the native query planner to have slight differences when compared to the legacy, JavaScript-based query planner. We've determined these differences to be semantically insignificant, based on an analysis of approximately 2.5 million unique user operations in GraphOS and a comparison of about 630 million operations from actual router deployments running in shadow mode over four months.

<Note>

The subgraph operations generated by the query planner may change with each release. We strongly recommend against relying on their exact shape, as new router features and optimizations may continue to change them.

</Note>

## Metrics for native query planner

The available metrics for the native query planner are listed and described in the [router standard instruments](/router/configuration/telemetry/instrumentation/standard-instruments#query-planner)) page.
